package seven.test_7_8;

import java.util.Scanner;

public class TestMain2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        float f = scanner.nextFloat();
        String str = scanner.next();
        char c = str.charAt(0);
        int count = 20;
        f = f - 1;
        while (f > 0) {
            count += 1;
            f--;
        }
        if(c == 'y') {
            count += 5;
        }
        System.out.println(count);
    }
}
